// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "NEKit",
    platforms: [
        .iOS(.v12),
//        .macOS(.v11)
    ],
    products: [
       
        // Products define the executables and libraries a package produces, making them visible to other packages.
        .library(
            name: "NEKit",
            targets: ["NEKit"]),
    ],
    dependencies: [
        .package(url: "https://gitee.com/smallsea/CocoaAsyncSocket", from: "7.6.5"),
        .package(url: "https://gitee.com/smallsea/tun2socks", from: "0.8.0"),
        .package(url: "https://github.com/CocoaLumberjack/CocoaLumberjack", from: "3.7.0"),
        .package(url: "https://gitee.com/smallsea/Resolver", from: "0.3.0"),
        .package(url: "https://gitee.com/smallsea/YamlSwift", from: "3.4.4"),
//        .package(url: "https://gitee.com/smallsea/mmdb_custom", from: "0.5.1")
        .package(url: "https://gitee.com/smallsea/mmdb_custom", branch: "master"),
//        .package(url: "https://github.com/jedisct1/swift-sodium", from: "0.9.1")
 
    ],
    targets: [
        .target(
            name: "NEKit",
            dependencies: [
                .product(name: "CocoaAsyncSocket", package: "CocoaAsyncSocket"),
                .product(name: "CocoaLumberjack", package: "CocoaLumberjack"),
                .product(name: "CocoaLumberjackSwift", package: "CocoaLumberjack"),
               // .product(name: "CocoaLumberjackSwiftLogBackend", package: "CocoaLumberjack"),
                .product(name: "tun2socks", package: "tun2socks"),
                .product(name: "Resolver", package: "Resolver"),
                .product(name: "Yaml", package: "YamlSwift"),
                .product(name: "MMDB", package: "mmdb_custom"),
//                .product(name: "Sodium", package: "swift-sodium"),

            ],
            path: "src"
        ),
    ]
//    targets: [
//        // Targets are the basic building blocks of a package, defining a module or a test suite.
//        // Targets can depend on other targets in this package and products from dependencies.
//        .target(
//            name: "NEKit"),
//        .testTarget(
//            name: "NEKitTests",
//            dependencies: ["NEKit"]),
//    ]
)
